﻿
<div class="all-elements">
    <div id="sidebar" class="page-sidebar">
        <div class="page-sidebar-scroll">
            <div class="nav-item selected-nav-item" data-ng-repeat="r in roleByGroup">
                <a href="#/{{r.RoleValue}}">
                    <div class="icon-nav {{r.RoleValue}}"></div>
                    {{r.RoleName}}
                </a>
            </div>
            <div class="nav-item">
                <a href="#">
                    <div class="icon-nav icon-share" onclick="logout()"></div>
                    THOÁT
                </a>
                <script>
                    function logout() {
                        localStorage.removeItem("idkey");
                        localStorage.removeItem("authen");
                        localStorage.removeItem("menu");
                        $location.path('/login/');
                    }
                </script>
            </div>
        </div>
    </div>

    <div id="content" class="page-content">

        <div class="page-header">
            <p class="logo">
            </p>

            <a href="#" class="deploy-sidebar"></a>
            <div class="user">
                <span class="name">{{userName}}</span>
                <div class="notifi">
                    <span class="noti-chart" ng-show="countNewMessage>0"><a href="#/newMessage">{{countNewMessage}}</a></span>
                    <span class="noti-friend" ng-show="countAddFriend>0"><a href="#/newFriend">{{countAddFriend}}</a></span>
                    <span class="noti-fromroom" ng-show="countFromRoom>0"><a href="#/newFromRoom">{{countFromRoom}}</a></span>
                </div>
            </div>
        </div>

        <div class="page-content-wrapper">
            <div class="container no-bottom">
                <div class="heading">
                    <div class="heading-left">
                        <h3>thông tin cá nhân</h3>
                    </div>

                </div>
            </div>
            <div class="adhere-room">
                <div>
                    <img class="image-decoration friend-online" ng-src="{{severName}}Avatar/{{profile.Avatar}}" width="75" height="75" />
                    <span class="label">Tên </span> <span>{{profile.UserName}}</span>
                    <span ng-show="isMyProfile" class="float-right"><span class="icon-setting icon-inline blue-icon float-right" ng-click="profileShowTaskClick()"></span><a href="#/userDetail/{{profile.Id}}/{{routeId}}" ng-show="profileShowTask" class="float-right">Cập nhật thông tin</a></span>
                    <span ng-show="isFriend || waitAccept" class="float-right"><span class="icon-setting icon-inline blue-icon float-right " ng-click="friendShowTaskClick()"></span><span ng-show="friendShowTask" class="float-right" ng-click="deleteFriend()">Hủy kết bạn</span></span>
                    <span ng-show="!isFriend && !isMyProfile && !waitAccept" class="float-right" ng-click="addFriend()">Thêm bạn<span class="icon-add-1 icon-inline float-right"></span></span>
                </div>
                <div><span class="label">Tên đầy đủ </span> <span>{{profile.FullName}}</span></div>
                <div><span class="label">SDT </span> <span>{{profile.PhoneNumber}}</span></div>
                <div><span class="label">Email </span> <span>{{profile.Email}}</span></div>

            </div>
            <div>Phòng đang tham gia: </div>
            <div id="listRoom" class="list-room">
                <div class="room" data-ng-repeat="r in roomByUser" ng-class="{myroom: r.Master==true}">
                    <a href="#/lesson/{{r.RoomId}}/{{r.CurrentLesson}}">
                        <div class="room-number">{{r.RoomId}}</div>
                        <div class="room-name">{{r.RoomName}}</div>
                    </a>
                </div>
            </div>
            <div ng-if="isMyProfile">Danh sách bạn bè:</div>
            <div ng-if="!isMyProfile">Bạn bè của {{profile.UserName}}</div>
            <ul class="list-friend-big">
                <li id="friend_{{f.Id}}" data-ng-repeat="f in friends">
                    <a href="#/profile/{{f.FriendId}}">
                        <img class="image-decoration friend-online" ng-src="{{severName}}Avatar/{{f.Avatar}}" />
                    </a>
                    <span class="icon-remove-sign-4 icon-inline gray-icon right" ng-click="deleteFriendHasId(f)"></span>
                    <span>{{f.FriendName}}</span>
                </li>
            </ul>
            <div class="adhere-room">
                <input id="findFriendInput" type="text" placeholder="Tìm bạn bè" /><input type='submit' ng-click="findFriend()" value='Tìm bạn' />
            </div>
            <ul class="list-friend-big" id="listsearch">
                <li id="friend_{{f.Id}}" data-ng-repeat="f in searchFriendList">
                    <a href="#/profile/{{f.Id}}">
                        <img class="image-decoration friend-online" ng-src="{{severName}}Avatar/{{f.Avatar}}" />
                    </a>
                    <span>{{f.UserName}}</span>
                </li>
            </ul>
            <div id="paging"></div>
        </div>
    </div>
</div>
